package org.jsbd.boss.util;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

public class HasDoUtil {


    private static Set<String> userSet = new HashSet<>(63050);

    static {
        InputStream input = HasDoUtil.class.getClassLoader().getResourceAsStream("new.properties");
        InputStreamReader inputReader = null;
        BufferedReader bufferReader = null;
        try {
            inputReader = new InputStreamReader(input);
            bufferReader = new BufferedReader(inputReader);
            String line = bufferReader.readLine();
            String[] split = line.split(",");
            for (String imsi : split) {
                userSet.add(imsi);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                inputReader.close();
                bufferReader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }
    }

    public static boolean contain(String imsi) {
        return userSet.contains(imsi);
    }

}
